<?php 
/**
* 首页控制器
*/
class IndexController extends Controller
{
	
	public function Index()
	{
		// $sql = "select * from sns";
		// $res = M()->query($sql);

		$res = D('sns')->news();

		//分配变量

		$this->assgin('res',$res);
		$this->assgin('name','小王');
		$this->assgin('sex','男');

		// 引模板
		$this->display();
	}

	public function Show()
	{
		$res = D('sns')->news();
		echo "这个是列表功能";
		$this->display();
	}
}















 ?>